
coins = [1, 2, 5, 10, 20, 50, 100, 200]
def search(value, coins):
    coin = coins.pop()    
    if coin == 1:
        return 1
    else:
        return sum([search(value - i * coin, coins[:]) \
                for i in range(value/coin+1)])

print search(200, coins)
